import request from '@/utils/request';

export function selectAll(params) {
  return request({
    url: `/MaintenanceRecord/fenxiang/selectAll`,
    method: 'get',
    params: params
  });
}

export function addFenxiang(data) {
  return request({
    url: `/MaintenanceRecord/fenxiang/add`,
    method: 'post',
    data: data
  });
}

export function updateFenxiang(recordid, data) {
  return request({
    url: `/MaintenanceRecord/fenxiang/update/${recordid}`,
    method: 'put',
    data: data
  });
}

// 删除（逻辑删除）
export function deleteFenxiang(recordid) {
  return request({
    url: `/MaintenanceRecord/fenxiang/delete/${recordid}`,
    method: 'delete'
  });
}

export function downloadFenxiang() {
  return request({
    url: `/MaintenanceRecord/fenxiang/download`,
    method: 'GET',
    responseType: 'blob'
  });
}